package com.me.darkness_is_coming;

import android.content.Context;
import android.os.Bundle;

import android.os.PowerManager;
import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import com.me.darkness_is_coming.main.MainGame;

public class MainActivity extends AndroidApplication
{
    protected PowerManager.WakeLock mWakeLock;

    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        final PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
        this.mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "WakeLock");
        this.mWakeLock.acquire();
        AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();

        initialize(MainGame.getInstance(), cfg);
}

    @Override
    public void onDestroy() {
        this.mWakeLock.release();
        super.onDestroy();
    }
}